import Taro, {Component} from "@tarojs/taro";
import {View, RichText} from "@tarojs/components";

import {inject, observer} from '@tarojs/mobx'
import {IStoreProps} from '../../store/Stores'
import {getRuntime} from '../../utils/common'

import './aboutus.less'
import {companyName} from "../../utils/common";

// 确认订单


interface IHomeProps extends IStoreProps {}

@inject("stores")
@observer
class Personnel extends Component<IHomeProps> {
  constructor(props) {
    super(props)
  }

  state = {
    info: {}
  }

  componentWillMount() {
    Taro.setNavigationBarTitle({title: '关于我的'})
    this.getAboutUs()
  }

  getAboutUs() {
    let { homeStore } = this.props.stores

    homeStore.getAboutUs({
      callback: res => {
        this.setState({info: res})
      }
    })
  }
  
  render() {
    let { info } = this.state
    return (
      <View className='my-help-detail'>
        <View className='list-title'>{companyName}</View>
        <View className='article-wrap article rich-text'>
          <RichText nodes={info.content} />
        </View>
      </View>
    )
  }
}

export default Personnel
